/*
 Navicat Premium Data Transfer

 Source Server         : 119.29.235.74
 Source Server Type    : MySQL
 Source Server Version : 80034 (8.0.34)
 Source Host           : 119.29.235.74:3306
 Source Schema         : dish_selling

 Target Server Type    : MySQL
 Target Server Version : 80034 (8.0.34)
 File Encoding         : 65001

 Date: 17/10/2023 20:54:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键(自增)',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `consignee` varchar(50) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '收货人',
  `sex` varchar(2) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '性别',
  `phone` varchar(11) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '手机号',
  `address_detail` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '地址详情',
  `label` varchar(10) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '标签（家、公司、学校等）',
  `id_default` tinyint(1) DEFAULT NULL COMMENT '是否默认（1是默认）',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除（1已删除）',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of address
-- ----------------------------
BEGIN;
INSERT INTO `address` (`id`, `user_id`, `consignee`, `sex`, `phone`, `address_detail`, `label`, `id_default`, `deleted`) VALUES (1, 1, '', '', '', '', '', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for address_dic
-- ----------------------------
DROP TABLE IF EXISTS `address_dic`;
CREATE TABLE `address_dic` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `district_name` varchar(50) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '区、县',
  `street_name` varchar(50) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '乡、镇、街道',
  `village_name` varchar(50) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '小区、写字楼、学校等',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of address_dic
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '管理员名',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '密码(加密后)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` (`id`, `name`, `password`, `create_time`, `update_time`, `deleted`) VALUES (1, 'gnyxy', 'e10adc3949ba59abbe56e057f20f883e', '2023-09-17 21:52:09', NULL, 0);
INSERT INTO `admin` (`id`, `name`, `password`, `create_time`, `update_time`, `deleted`) VALUES (2, 'admin', 'fcea920f7412b5da7be0cf42b8c93759', '2023-09-17 21:54:10', '2023-09-17 21:54:10', 0);
COMMIT;

-- ----------------------------
-- Table structure for carousel
-- ----------------------------
DROP TABLE IF EXISTS `carousel`;
CREATE TABLE `carousel` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `image` varchar(500) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片URL',
  `description` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '描述',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态(1启用)',
  `deleted` tinyint DEFAULT NULL COMMENT '删除(1删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of carousel
-- ----------------------------
BEGIN;
INSERT INTO `carousel` (`id`, `image`, `description`, `status`, `deleted`) VALUES (1, 'https://dogefs.s3.ladydaily.com/~/source/wallhaven/small/gp/gp9god.jpg?w=400&h=200&fmt=webp', '22', 1, 0);
INSERT INTO `carousel` (`id`, `image`, `description`, `status`, `deleted`) VALUES (2, 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/33b9d43a-c915-4427-ae50-655af81dcbb0.png', '王老吉', 1, 0);
INSERT INTO `carousel` (`id`, `image`, `description`, `status`, `deleted`) VALUES (3, 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/189cb1f8-e590-4fab-b02c-1be581f2e90a.jpg', '22', 1, 0);
INSERT INTO `carousel` (`id`, `image`, `description`, `status`, `deleted`) VALUES (4, 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/99d436e2-544d-4a92-a3b6-5cabeece13e6.jpg', '11', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for cart
-- ----------------------------
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `dish_id` bigint DEFAULT NULL COMMENT '菜品id',
  `material_id` bigint DEFAULT NULL COMMENT '菜品材料id',
  `number` decimal(10,2) DEFAULT NULL COMMENT '数量',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of cart
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cart_info
-- ----------------------------
DROP TABLE IF EXISTS `cart_info`;
CREATE TABLE `cart_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `cart_id` bigint DEFAULT NULL COMMENT '购物车id',
  `dish_id` bigint DEFAULT NULL COMMENT '菜品id',
  `material_id` bigint DEFAULT NULL COMMENT '菜品材料id',
  `material_number` decimal(10,2) DEFAULT NULL COMMENT '菜品材料数量',
  `is_main` tinyint(1) DEFAULT NULL COMMENT '是否是主菜',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of cart_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for collect
-- ----------------------------
DROP TABLE IF EXISTS `collect`;
CREATE TABLE `collect` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '菜品名',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片url',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `dish_id` bigint DEFAULT NULL COMMENT '菜品id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of collect
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for dish
-- ----------------------------
DROP TABLE IF EXISTS `dish`;
CREATE TABLE `dish` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '菜品名',
  `type_id` bigint DEFAULT NULL COMMENT '分类id',
  `discount` decimal(10,2) DEFAULT NULL COMMENT '折扣率',
  `default_price` decimal(10,2) DEFAULT NULL COMMENT '默认价格',
  `price` decimal(10,2) DEFAULT NULL COMMENT '自定义价格',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片url',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '描述',
  `recommended` tinyint DEFAULT NULL COMMENT '推荐的菜品(1为推荐)',
  `status` tinyint(1) DEFAULT NULL COMMENT '禁用(1为启用)',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of dish
-- ----------------------------
BEGIN;
INSERT INTO `dish` (`id`, `name`, `type_id`, `discount`, `default_price`, `price`, `image`, `description`, `recommended`, `status`, `deleted`) VALUES (1, '美味菜', 2, 0.20, 0.00, 0.00, 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/0de871ff-7344-480a-9fb2-ef03b730bd1c.jpg', '这是一个美味的菜品', NULL, 1, 0);
INSERT INTO `dish` (`id`, `name`, `type_id`, `discount`, `default_price`, `price`, `image`, `description`, `recommended`, `status`, `deleted`) VALUES (4, '3', 1, 1.00, 0.00, 0.00, '2', '0', NULL, 0, 0);
INSERT INTO `dish` (`id`, `name`, `type_id`, `discount`, `default_price`, `price`, `image`, `description`, `recommended`, `status`, `deleted`) VALUES (9, '1', 0, 1.00, 0.00, 0.00, '', '', NULL, 0, 1);
INSERT INTO `dish` (`id`, `name`, `type_id`, `discount`, `default_price`, `price`, `image`, `description`, `recommended`, `status`, `deleted`) VALUES (10, '321', NULL, 3.00, 0.00, 0.00, 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/3da6a97f-b982-4198-ae29-5e701307ef88.jpg', '123', NULL, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for dish_info
-- ----------------------------
DROP TABLE IF EXISTS `dish_info`;
CREATE TABLE `dish_info` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dish_id` bigint DEFAULT NULL COMMENT '菜品id',
  `material_id` bigint DEFAULT NULL COMMENT '菜品材料id',
  `material_number` decimal(10,2) DEFAULT NULL COMMENT '菜品材料数量',
  `is_main` tinyint(1) DEFAULT NULL COMMENT '主菜(1为主菜)',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1为删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of dish_info
-- ----------------------------
BEGIN;
INSERT INTO `dish_info` (`id`, `dish_id`, `material_id`, `material_number`, `is_main`, `deleted`) VALUES (1, 1, 123, 2.00, 1, 0);
INSERT INTO `dish_info` (`id`, `dish_id`, `material_id`, `material_number`, `is_main`, `deleted`) VALUES (2, 1, 456, 1.00, 0, 0);
INSERT INTO `dish_info` (`id`, `dish_id`, `material_id`, `material_number`, `is_main`, `deleted`) VALUES (3, 4, 0, 0.00, 0, 0);
INSERT INTO `dish_info` (`id`, `dish_id`, `material_id`, `material_number`, `is_main`, `deleted`) VALUES (4, 9, 0, 0.00, NULL, 1);
INSERT INTO `dish_info` (`id`, `dish_id`, `material_id`, `material_number`, `is_main`, `deleted`) VALUES (5, 10, 0, 0.00, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for dish_material
-- ----------------------------
DROP TABLE IF EXISTS `dish_material`;
CREATE TABLE `dish_material` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '菜品材料名',
  `image` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片url',
  `default_number` decimal(10,2) DEFAULT NULL COMMENT '默认数量',
  `unit` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '单位',
  `default_price` decimal(10,2) DEFAULT NULL COMMENT '默认价格',
  `range` decimal(10,2) DEFAULT NULL COMMENT '范围',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `recommended` tinyint(1) DEFAULT NULL COMMENT '推荐的菜品(1为推荐)',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态(1为启用)',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1为删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of dish_material
-- ----------------------------
BEGIN;
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (1, '12', NULL, NULL, NULL, 1.00, NULL, NULL, NULL, 0, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (2, '白米饭', NULL, 1.00, '碗', 2.00, 1.00, NULL, NULL, 1, 1);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (3, '白米饭', NULL, 1.00, '碗', 2.00, 1.00, NULL, 1, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (4, '白米饭', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/298eff49-9acf-4e1f-9afc-a41950c7712f.png', 1.00, '碗', 2.00, 1.00, NULL, 1, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (5, '白米饭', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/298eff49-9acf-4e1f-9afc-a41950c7712f.png', 1.00, '碗', 2.00, 1.00, NULL, 1, 1, 1);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (6, '白米饭', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/298eff49-9acf-4e1f-9afc-a41950c7712f.png', 1.00, '碗', 2.00, 1.00, NULL, 1, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (7, '白米饭', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/298eff49-9acf-4e1f-9afc-a41950c7712f.png', 1.00, '碗', 2.12, 1.00, NULL, 1, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (8, '白米饭', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/298eff49-9acf-4e1f-9afc-a41950c7712f.png', 1.00, '碗', 2.12, 1.00, 2.00, 1, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (9, '娃娃菜', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/765f6486-d0f8-4698-9331-d2ce00a4f0c4.webp', 500.00, 'g', 2.20, 100.00, 2.00, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (10, '娃娃菜', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/765f6486-d0f8-4698-9331-d2ce00a4f0c4.webp', 500.00, 'g', 2.20, 100.00, 2.00, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (11, '猪肉', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/781dd4b0-6772-4489-abec-9b009c00bd8d.JPG', 500.00, 'g', 10.00, 100.00, 10.00, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (12, '鸡蛋', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/b909feca-da98-422c-b2d9-110aebd4403f.webp', 1.00, '个', 1.00, 1.00, 0.99, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (13, '空心菜', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/929ca98c-66f2-4568-84c4-4f0ed365ebca.jpeg', 500.00, '克', 1.50, 100.00, 1.50, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (14, '红辣椒', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/14417aeb-849a-4acb-a508-8f19992cecb3.webp', 500.00, '克', 5.50, 50.00, 4.99, 0, 1, 0);
INSERT INTO `dish_material` (`id`, `name`, `image`, `default_number`, `unit`, `default_price`, `range`, `price`, `recommended`, `status`, `deleted`) VALUES (15, '青辣椒', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/c3e25448-22e6-47a5-8fa3-41f9f894775e.webp', 500.00, '克', 3.88, 50.00, 3.88, 0, 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for order_detail
-- ----------------------------
DROP TABLE IF EXISTS `order_detail`;
CREATE TABLE `order_detail` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` bigint DEFAULT NULL COMMENT '订单id',
  `name` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '菜品或菜品材料名',
  `image` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片url',
  `dish_id` bigint DEFAULT NULL COMMENT '菜品id',
  `dish_content` blob COMMENT '菜品内容',
  `material_id` bigint DEFAULT NULL COMMENT '菜品材料id',
  `number` decimal(10,2) DEFAULT NULL COMMENT '数量',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '总价',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1为删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of order_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint DEFAULT NULL COMMENT '用户id',
  `consignee` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '收货人',
  `number` varchar(50) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '订单号',
  `status` tinyint DEFAULT NULL COMMENT '订单状态(1待付款 2待接单 3已接单 4派送中 5已完成 6已取消)',
  `address_id` bigint DEFAULT NULL COMMENT '地址id',
  `order_time` datetime DEFAULT NULL COMMENT '下单时间',
  `checkout_time` datetime DEFAULT NULL COMMENT '付款时间',
  `pay_status` tinyint(1) DEFAULT NULL COMMENT '支付状态(0未支付 1已支付 2退款)',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '总价',
  `remark` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '备注信息',
  `phone` varchar(11) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '手机号',
  `address` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '详细地址信息',
  `cancel_reason` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '取消订单理由',
  `rejection_reason` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '拒单理由',
  `cancel_time` datetime DEFAULT NULL COMMENT '取消订单时间',
  `delivery_status` tinyint(1) DEFAULT NULL COMMENT '配送状态(1立即送出0选择具体时间)',
  `delivery_time` datetime DEFAULT NULL COMMENT '送达时间',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of orders
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for type
-- ----------------------------
DROP TABLE IF EXISTS `type`;
CREATE TABLE `type` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '分类名称',
  `image` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '图片url',
  `status` tinyint(1) DEFAULT NULL COMMENT '状态(1已启用)',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of type
-- ----------------------------
BEGIN;
INSERT INTO `type` (`id`, `name`, `image`, `status`, `deleted`) VALUES (1, '分类1', 'https://example.com/category1.jpg', 1, 0);
INSERT INTO `type` (`id`, `name`, `image`, `status`, `deleted`) VALUES (2, '11', '22', 1, 0);
INSERT INTO `type` (`id`, `name`, `image`, `status`, `deleted`) VALUES (3, '12', 'https://dish-gnyxy.oss-cn-hangzhou.aliyuncs.com/a0b73c59-4311-41b2-9256-5219fb4a3be8.jpg', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键id',
  `openid` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '微信唯一标识id',
  `name` varchar(255) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '姓名',
  `phone` varchar(11) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '手机号',
  `user_points` int DEFAULT NULL COMMENT '积分',
  `sex` varchar(2) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '性别',
  `id_number` int DEFAULT NULL COMMENT '身份证号',
  `avater` varchar(500) COLLATE utf8mb4_0900_bin DEFAULT NULL COMMENT '头像url',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint(1) DEFAULT NULL COMMENT '删除(1已删除)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `openid`, `name`, `phone`, `user_points`, `sex`, `id_number`, `avater`, `create_time`, `deleted`) VALUES (1, 'oP4Tg5EYt3KtHUvc0iSAtqCJO-0g', NULL, NULL, NULL, NULL, NULL, NULL, '2023-09-18 09:24:27', 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
